There are several categories of audio amplifiers, including class A, class AB, class C, class D etc. Class D amplifiers operate by means of output transistors acting as switches. When a transistor is off, the current through the transistor is effectively zero. When a transistor is on, the voltage across the transistor is small, ideally zero. In each case, the power dissipation is very low. This increases the efficiency, thus requiring less power from the power supply and smaller heat sinks for the amplifier. These are important advantages, particularly for portable battery-powered equipment.
A class-D audio amplifier typically uses two power transistors. One transistor switches the output to a positive voltage supply and the second transistor switches the output to a negative voltage supply. Some steering logic prevents a short circuit from being made by one transistor being switched on while the other transistor is still on. A square wave signal produced at an output of the amplifier as a result of this switching has a frequency of typically 350 kHz, i.e. considerably higher than the frequency range of an audio signal. The output amplitude of the amplifier can be modulated by altering the pulse width of the output signal. With a passive filter (usually LC-filter) the Pulse Width Modulated (PWM) output signal is filtered to remove high frequency components of the output signal cause by the switching operations. The amplified audio signal can therefore be used for driving a loudspeaker. FIG. 1 shows a typical straightforward solution for class D amplification, in which an input analog signal 101 is compared by a comparator 103 with a reference signal 102 having a triangular waveform. The comparator 103 provides an output that switches between two output values when the input signal 101 crosses the triangular waveform signal 102, resulting in an output signal 105 having a pulse width modulation that is dependent on the magnitude of the input signal 101. The output signal 105 from the comparator 103 is provided to a switch driver 104, which provides corresponding switching signals to a pair of power transistors M1, M2, switching transistor M1 on and transistor M2 off when the output signal 105 is high, and transistor M1 off and transistor M2 on when the output signal 105 is low. The transistors M1, M2 are connected in series between a pair of voltage supply lines, in this case between a positive supply line at Vp and a negative supply line at VN. An output connection 106 between the transistors M1, M2 therefore varies between VP and VN (discounting any voltage drop across the transistors), resulting in a voltage output signal 107 having the form of the pulse width modulation signal 105. A combined resistive and inductive load, in this case a conventional magnet-coil loudspeaker 108, is connected between the output connection 106 and ground 109.
Other types of switching amplifiers are also known, including types where the PWM signal is generated in the digital domain.
An LC circuit comprising inductor 110 and capacitor 111 provide a filter to suppress the high frequency switching components of the output signal from the switching amplifier. The current 112 passing through the loudspeaker 108 is then an accurate amplified representation of the original input signal 101.
Such class D amplifiers can be designed to be highly efficient, a feature that is particularly advantageous in portable applications, where typical loudspeaker output powers may be up to around 3 W. A variation on the above amplifier is illustrated in FIG. 2, in which the amplifier incorporates a second pair of power switching transistors M1′ M2′. The first pair of transistors M1, M2 are driven by a first switching circuit 204a as before by a signal dependent on the input signal 101 compared with a triangular waveform 102, in this case switching a first output connection 206a between the positive supply voltage VP and ground. The second pair of transistors M1′, M2′ are driven by a second switching signal 204b with a signal that is dependent on an inverted version of the input signal 101 compared with the same triangular waveform 102, and provides a voltage on a second connection 206b between the positive supply voltage VP and ground. This type of switching amplifier, at least when driving a partially inductive load such as a magnet-coil loudspeaker, does not require additional filtering components. The required PWM switching pattern for such filterless operation is illustrated in reference [1] below.
The maximum Sound Pressure Level (SPL) of a speaker connected to a class D amplifier in portable applications is mostly limited by the mechanical construction of the speaker. Particularly at low audio frequencies (<600 Hz) the speaker maximum input power is limited. For safety reasons, a high pass filter is typically added in the audio path. However, for short moments the speaker may be subjected to significantly more power than its rating. An algorithm that allows for the maximum speaker output power to be obtained under all conditions is described in reference [3] below. This algorithm reduces or increases the gain at certain frequencies dependent on the condition of the speaker. The algorithm requires as an input a measure of the current running through the speaker, which therefore needs to be sensed at the output of the class D amplifier.
Accurately measuring the current flowing through the speaker is however not a trivial operation, due to the switched nature of the output signal. Other requirements may also need to be met for current sensing, such as the speaker current being digitized, i.e. converted into a digital signal. Two important requirements are that the current should be measured accurately enough as well at a sufficient resolution for a current limiting algorithm to work effectively. A 12 bit ADC is typical for such applications, although other resolutions would also be possible, depending on the application and the particular algorithm used to process the digital current signal.